define(['jquery', 'cm', 'swiper'], function () {
    $('footer').load('../html/footer.html')
    new class News {
        constructor() {
            this.init()
        }
        init() {
            this.chose()
            this.jude()
        }
        chose() {
            $('#product .choose li').on('click', function () {
                let index = $(this).index()
                console.log(index)
                $('#product .bottom>div').eq(index).addClass('active').siblings().removeClass('active')
            })
        }
        jude() {
            console.log($('.login'))
            if (getCookie('用户')) {
                let cookie = getCookie('用户')
                $('.login').html(`<a class='ture' href="../html/getPrice.html">${cookie}<img src="../imgaes/index/钻石.png" alt=""></a>`)
            }
        }
    }

})